import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86138
 * Date: 2024-05-21
 * Time: 10:27
 */



/*class Test {
    public int aMethod(){
        static int i = 0;
        i++;
        return i;
    }
    public static void main7(String args[]){
        Test test = new Test();
        test.aMethod();
        int j = test.aMethod();
        System.out.println(j);
    }
}*/


class Test6{

    private float f=1.0f;

    int m=12;

    static int n=1;

    public static void main(String args[]){

        Test t=new Test();

    }

}

class HasStatic {// 1



    private static int x = 100;// 2
    public static void main4(String args[]) {// 3
        HasStatic hsl = new HasStatic();// 4
        hsl.x++;// 5
        HasStatic hs2 = new HasStatic();// 6
        hs2.x++;// 7
        hsl = new HasStatic();// 8
        hsl.x++;// 9
        HasStatic.x--;// 10
        System.out.println(" x=" + x);// 11
    }
}



class Main {

    public static void main3(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int x = scanner.nextInt();
            int y = scanner.nextInt();
            Data data = new Data(x, y);
            System.out.println(data.getX() + data.getY());
        }
    }

}

class Data {

    public int x;
    public int y;

    public Data(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }

}


public class May_21 {


    //汉诺塔
    public static void move(char pos1,char pos2){
        System.out.println(pos1 + "->" + pos2 + "  ");
    }
    public static void hannoi(int n, char pos1, char pos2, char pos3){
        if(n==1){
            move(pos1, pos3);
        }else{
            hannoi(n-1, pos1, pos3, pos2);
            move(pos1, pos3);
            hannoi(n-1, pos2, pos1, pos3);
        }
    }
    public static void main1(String[] args) {
        /*String s = "0";
        System.out.println(s);*/
        char A = 'A';
        char B = 'B';
        char C = 'C';
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        hannoi(n, A, B, C);
        sc.close();

    }
}
